package com.sinocare.report.controller;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.sinocare.common.entity.vo.Interpretation;
import com.sinocare.common.result.Result;
import com.sinocare.common.result.ResultCode;
import com.sinocare.report.service.InterpretationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/Interpretation")
@Api(tags = "报表管理接口")
public class InterpretationController {
    @Resource
    private InterpretationService interpretationService;

    @ApiOperation(value = "空腹血糖", notes = "血糖值 ", httpMethod = "GET")
    @RequestMapping(value = "/interpretation", method = RequestMethod.GET)
    public Result findInterpretation() throws Exception {

        List<Integer> list1=interpretationService.glu_food_status();
        System.out.println("结果"+list1);
        return Result.ok(ResultCode.SUCCESS,list1);
    }
}
